Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make signurl work with objects containing tildes. #783

Merged
merged 1 commit into from
May 20, 2019

Conversation

houglum
Copy link
Collaborator

@houglum houglum commented May 20, 2019

Fixes https://issuetracker.google.com/issues/133019153

Per the docs, the tilde character should not be percent-encoded:

When defining the path to the resource, you must percent encode the
following reserved characters: ?=!#$&'()*+,:;@[]."

https://cloud.google.com/storage/docs/access-control/signing-urls-manually

Note that Python 3's urllib quote method ignores the tilde, but Python
2's does not:

  • Py2 docs: "Letters, digits, and the characters '_.-' are never quoted."
  • Py3 docs: "Letters, digits, and the characters '_.-~' are never quoted."

Fixes https://issuetracker.google.com/issues/133019153

Per the docs, the tilde character should not be percent-encoded:

When defining the path to the resource, you must percent encode the
following reserved characters: ?=!#$&'()*+,:;@[]."

https://cloud.google.com/storage/docs/access-control/signing-urls-manually

Note that Python 3's urllib quote method ignores the tilde, but Python
2's does not:
- Py2 docs: "Letters, digits, and the characters '_.-' are never quoted."
- Py3 docs: "Letters, digits, and the characters '_.-~' are never quoted."
Copy link
Contributor

@catleeball catleeball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Ship it! ⛵

@houglum houglum merged commit 5fe3491 into GoogleCloudPlatform:master May 20, 2019
houglum added a commit to houglum/gsutil that referenced this pull request Jun 28, 2019
The tilde behavior was changed between 2 and 3; this also bit us in
another issue, see GoogleCloudPlatform#783.
houglum added a commit that referenced this pull request Jun 28, 2019
The tilde behavior was changed between 2 and 3; this also bit us in
another issue, see #783.
houglum added a commit that referenced this pull request Jun 28, 2019
The tilde behavior was changed between 2 and 3; this also bit us in
another issue, see #783.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants